Programming With QuickTime VR 2.1

Previous | Overview | Contents | Next

QuickTime VR Movie Files

A QuickTime VR movie file is a QuickTime movie file. The only differences between a QuickTime VR movie file and a typical time-based QuickTime movie file are the type and usage of the tracks contained in the movie and the necessary QuickTime user data attached to the movie. In particular, for the Mac OS, the file type should be 'MooV' ; for Windows systems, the file extension should be .mov .

See "Specifying a Movie Controller" for instructions on adding the appropriate user data to the QuickTime VR movie file.

Also, as with any QuickTime movie that is intended to be played on both operating systems, a data fork version of the file should be created using the FlattenMovie function with the flattenAddMovieToDataFork flag set. Note that the resulting file is optimized for random access and might not perform well in an environment that requires streaming access (such as Web browsing).

Single-Node Object Movies

Figure 3 illustrates the basic structure of a single-node object movie. As you can see, every object movie contains at least three tracks: (1) a QTVR track, (2) an object track, and (3) an object image track.

Figure 3 The structure of a single-node object movie file

For a single-node object movie, the QTVR track contains just one sample. There is a corresponding sample in the object track, whose time and duration are the same as the time and duration of the sample in the QTVR track. The time base of the movie is used to locate the proper video sample in the object image track. For an object movie, the frame corresponding to the first row and column in the object image array is located at the same time as the corresponding QTVR and object track samples. The duration of all the video samples is the same as the duration of the corresponding QTVR sample and the object sample.

In addition to these three required tracks, an object movie can also contain a hot spot image track and any number of standard QuickTime tracks (such as video, sound, and text tracks). A hot spot image track for an object is a QuickTime video track that contains images of colored regions delineating the hot spots; an image in the hot spot image track must be synchronized to match the appropriate image in the object image track. A hot spot image track should be 8 bits deep and can be compressed with any lossless compressor (including temporal compressors).

To assign a single fixed-position hot spot to all views of an object, you should create a hot spot image track that consists of a single video frame whose duration is the entire node time.

To play a time-based track with the object movie, you must synchronize the sample data of that track to the start and stop times of a view in the object image track. For example, to play a different sound with each view of an object, you might store a sound track in the movie file with each set of sound samples synchronized to play at the same time as the corresponding object's view image. (This technique also works for video samples.) Another way to add sound or video is simply to play a sound or video track during the object's view animation; to do this, you need to add an active track to the object that is equal in duration to the object's row duration.

Single-Node Panoramic Movies

Figure 4 illustrates the basic structure of a single-node panoramic movie. As you can see, every panoramic movie contains at least three tracks: (1) a QTVR track, (2) a panorama track, and (3) a panorama image track.

Figure 4 The structure of a single-node panoramic movie file

For a single-node panoramic movie, the QTVR track contains just one sample. There is a corresponding sample in the panorama track, whose time and duration are the same as the time and duration of the sample in the QTVR track. The time base of the movie is used to locate the proper video sample in the panorama image track. For a panoramic movie, the video sample for the first diced frame of a node's panoramic image is located at the same time as the corresponding QTVR and panorama track samples. The duration of all the video samples is the same as the duration of the corresponding QTVR sample and the panorama sample.

Like an object movie, a panoramic movie can contain an optional hot spot image track and any number of standard QuickTime tracks. A panoramic movie can also contain panoramic image tracks with a lower resolution. The video samples in these low-resolution image tracks must be located at the same time and must have the same total duration as the QTVR track. Likewise, the video samples for a hot spot image track, if one exists, must be located at the same time and must have the same total duration as the QTVR track.

In a QuickTime VR movie file, the panorama image tracks and panorama hot spot tracks must be disabled, but the object image tracks and object hot spot tracks must be enabled.

Multinode Movies

A multinode QuickTime VR movie can contain any number of object and panoramic nodes. Figure 5 illustrates the structure of a QuickTime VR movie that contains five nodes (in this case, three panoramic nodes and two object nodes).

Figure 5 The structure of a multinode movie file

Panoramic tracks and object tracks must never be located at the same time.


© 1997 Apple Computer, Inc.

Previous | Overview | Contents | Next